import {listIp} from "@/api/cmdb/ip";

const ip = {
  state: {
    ips: [],
    ipTotal: '',
  },

  mutations: {
    SET_IP: (state, response) => {
      state.ips = response.rows
      state.ipTotal = response.total
    },
  },

  actions: {
    /** 查询ip列表列表 */
    GetIpList({ commit ,state}) {
      listIp().then(response => {
        commit('SET_IP',response)
      });
    },
  }
}

export default ip
